package pattern.creational.factoryMethod;

/**
 * 定义：定义了一个创建对象的接口，但由子类决定要实例化哪个类。工厂方法把实例化操作推迟到子类。
 *
 * @Author Gavin
 * @date 2020.07.14 12:41
 */
public class Test {
    public static void main(String[] args) {
        VideoFactory javaFactory = new JavaVideoFactory();
        Video javaVideo = javaFactory.productVideo();
        javaVideo.product();
        VideoFactory pyFactory = new PythonVideoFactory();
        Video pyVideo = pyFactory.productVideo();
        pyVideo.product();
    }
}
